<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #a19b9b;">

    </canvas>
    <script>
        var c=document.getElementById("myCanvas");
        var cxt=c.getContext("2d");
             cxt.moveTo(10,10);
             cxt.lineTo(50,30);
             cxt.lineTo(10,50);
             cxt.lineTo(10,10);
             cxt.stroke();
    </script>
</body>
</html>